import Vue from 'vue'
import Router from 'vue-router'
import Home from '../pages/index'
import JoinUs from '../join-us/index.vue'
import About from '../about-us/index.vue'
import Cooperative from '../cooperative-enterprise/index.vue'
import NewsCenter from '../News-center/index.vue'
import Map from '../pages/map.vue'
import Service from '../service/index.vue'

// import VueResource from 'vue-resource'
import ElementUI from 'element-ui'
import '@/assets/css/main.css'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import VueAxios from 'vue-axios'

Vue.use(Router)
Vue.use(ElementUI)
Vue.use(VueAxios, axios)
// Vue.use(VueResource)

export default new Router({
  // mode: 'history',
  routes: [
    {
      path: '/',
      component: Home
    },
    {
      path: '/map',
      component: Map
    },
    {
      path: '/index',
      component: Home
    },
    {
      path: '/join',
      component: JoinUs
    },
    {
      path: '/about',
      component: About
    },
    {
      path: '/cooperative',
      component: Cooperative
    },
    {
      path: '/news',
      component: NewsCenter
    },
    {
      path: '/service',
      component: Service
    },
    { 
      path: '*',
      redirect: '/index'
    }
  ]
})
